package com.gl.util;

import java.io.File;
import java.math.BigDecimal;
import java.util.*;

import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;

import org.come.bean.ConfigureBean;
import org.come.entity.Good;
import org.come.entity.Goodstable;
import org.come.entity.RoleSummoning;
import org.come.model.Configure;
import org.come.until.DDGoodUntil;
import org.come.until.GoodsListFromServerUntil;
import org.come.until.UserMessUntil;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;

import com.tool.role.RoleData;

import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;

public class Xy2Util {
    public static final Map<String, String> MODEL = new HashMap<>();
    public static final List<String> NEW_MODEL = new ArrayList<>();
    public static List<RoleSummoning> addpetList;
    public static String roleneworold = "新";
    public static String zzs = "5";

    // 使用HashMap优化角色坐骑前缀查找
    private static final Map<Long, String> RIDE_PREFIX_MAP = new HashMap<>();

    // 预计算常量
    private static final long EIGHTH_RIDE_OFFSET = 8L << 40;

    static {
        // 初始化角色坐骑前缀映射
        initRidePrefixMap();

        ConfigureBean allConfigure = UserMessUntil.getConfigureBean();
        Map<BigDecimal, Configure> item = allConfigure.getAllConfigure();
        Configure configure = item.get(new BigDecimal(1));
        if (configure != null) {
            if (configure.getLzjskg() != null) {
                zzs = configure.getLzjskg();
            }
            if (configure.getNeworold() != null) {
                roleneworold = configure.getNeworold();
            }
        }

        // 延迟初始化MODEL数据，避免类加载时占用过多内存
        initModelData();
        initNewModel();
    }

    /**
     * 初始化角色坐骑前缀映射
     */
    //    剑:1 扇:2 锤:3 斧头:4
    //    拳套:5 书:6 棍:7 鞭:8
    //    钩:9 刀:10 双环:11 枪:12
    //    幡:13 爪:14 浮尘:15 飘带:16
    //    灯笼:17 弓:18
    private static void initRidePrefixMap() {
        // 人族
        RIDE_PREFIX_MAP.put(20001L, "11101"); // 逍遥生
        RIDE_PREFIX_MAP.put(20002L, "11102"); // 剑侠客
        RIDE_PREFIX_MAP.put(20003L, "11103"); // 猛壮士
        RIDE_PREFIX_MAP.put(20004L, "12102"); // 飞燕女
        RIDE_PREFIX_MAP.put(20005L, "12103"); // 英女侠
        RIDE_PREFIX_MAP.put(20006L, "12101"); // 俏千金
        RIDE_PREFIX_MAP.put(20007L, "11104"); // 飞剑侠
        RIDE_PREFIX_MAP.put(20008L, "12104"); // 燕山雪
        RIDE_PREFIX_MAP.put(20009L, "11105"); // 纯阳子
        RIDE_PREFIX_MAP.put(20010L, "12105"); // 红拂女
        RIDE_PREFIX_MAP.put(20011L, "20011"); // 神秀生
        RIDE_PREFIX_MAP.put(20012L, "20012"); // 玲珑女

        // 魔族
        RIDE_PREFIX_MAP.put(21001L, "21101"); // 虎头怪
        RIDE_PREFIX_MAP.put(21002L, "21103"); // 夺命妖
        RIDE_PREFIX_MAP.put(21003L, "21102"); // 巨魔王
        RIDE_PREFIX_MAP.put(21004L, "22103"); // 小蛮妖
        RIDE_PREFIX_MAP.put(21005L, "22102"); // 骨精灵
        RIDE_PREFIX_MAP.put(21006L, "22101"); // 狐美人
        RIDE_PREFIX_MAP.put(21007L, "21104"); // 逆天魔
        RIDE_PREFIX_MAP.put(21008L, "22104"); // 媚灵狐
        RIDE_PREFIX_MAP.put(21009L, "21105"); // 混天魔
        RIDE_PREFIX_MAP.put(21010L, "22105"); // 九尾狐
        RIDE_PREFIX_MAP.put(21011L, "21011"); // 绝影魔
        RIDE_PREFIX_MAP.put(21012L, "21012"); // 霜月灵

        // 仙族
        RIDE_PREFIX_MAP.put(22001L, "31101"); // 神天兵
        RIDE_PREFIX_MAP.put(22002L, "31112"); // 智圣仙
        RIDE_PREFIX_MAP.put(22003L, "31103"); // 龙战将
        RIDE_PREFIX_MAP.put(22004L, "32103"); // 精灵仙
        RIDE_PREFIX_MAP.put(22005L, "32101"); // 舞天姬
        RIDE_PREFIX_MAP.put(22006L, "32102"); // 玄剑娥
        RIDE_PREFIX_MAP.put(22007L, "31104"); // 武尊神
        RIDE_PREFIX_MAP.put(22008L, "32104"); // 玄天姬
        RIDE_PREFIX_MAP.put(22009L, "31105"); // 紫薇神
        RIDE_PREFIX_MAP.put(22010L, "32105"); // 霓裳仙
        RIDE_PREFIX_MAP.put(22011L, "22011"); // 青阳使
        RIDE_PREFIX_MAP.put(22012L, "22012"); // 云中君

        // 鬼族
        RIDE_PREFIX_MAP.put(23001L, "41101"); // 祭剑魂
        RIDE_PREFIX_MAP.put(23002L, "41103"); // 猎魂引
        RIDE_PREFIX_MAP.put(23003L, "41102"); // 无崖子
        RIDE_PREFIX_MAP.put(23004L, "42101"); // 墨衣行
        RIDE_PREFIX_MAP.put(23005L, "42102"); // 夜溪灵
        RIDE_PREFIX_MAP.put(23006L, "42103"); // 幽梦影
        RIDE_PREFIX_MAP.put(23007L, "23007"); // 南冠客
        RIDE_PREFIX_MAP.put(23008L, "23008"); // 镜花影

        // 妖族
        RIDE_PREFIX_MAP.put(24001L, "240010"); // 沧浪君
        RIDE_PREFIX_MAP.put(24002L, "240020"); // 龙渊客
        RIDE_PREFIX_MAP.put(24003L, "240030"); // 忘忧子
        RIDE_PREFIX_MAP.put(24004L, "240040"); // 骊珠儿
        RIDE_PREFIX_MAP.put(24005L, "240050"); // 木兰行
        RIDE_PREFIX_MAP.put(24006L, "240060"); // 莫解语
        RIDE_PREFIX_MAP.put(24007L, "24007");  // 游无极
        RIDE_PREFIX_MAP.put(24008L, "24008");  // 临九渊
    }

    /**
     * 延迟初始化MODEL数据，减少类加载时的内存占用
     */
    private static void initModelData() {
        // 逍遥生系列
        MODEL.put("20001", "11101"); //逍遥生剑武器皮肤
        MODEL.put("4294987297", "11101");//逍遥生剑武器皮肤
        MODEL.put("81604398625", "11101");//逍遥生剑武器皮肤
        MODEL.put("26199300525601", "11101");//逍遥生剑武器皮肤
        MODEL.put("8589954593", "11111");//逍遥生扇子武器皮肤
        MODEL.put("85899365921", "11111");//逍遥生扇子武器皮肤
        MODEL.put("2000102", "11111");//逍遥生扇子武器皮肤
        MODEL.put("26225070329377", "11111");//逍遥生剑武器皮肤
        MODEL.put("1099511647777", "1110101");//逍遥生一坐骑皮肤
        MODEL.put("2199023275553", "1110102");//逍遥生2坐骑皮肤
        MODEL.put("3298534903329", "1110103");//逍遥生3坐骑皮肤
        MODEL.put("4398046531105", "1110104");//逍遥生4坐骑皮肤
        MODEL.put("5497558158881", "1110105");//逍遥生5坐骑皮肤
        MODEL.put("6597069786657", "1110106");//逍遥生6坐骑皮肤
        MODEL.put("7696581414433", "1110107");//逍遥生7坐骑皮肤
        MODEL.put("8796093053409", "1110108");//逍遥生8坐骑皮肤

        // 剑侠客系列
        MODEL.put("20002", "11102");//剑侠客的剑皮肤
        MODEL.put("2000201", "11102");//剑侠客的剑皮肤
        MODEL.put("47244660258", "11112");//剑侠客的锤子皮肤
        MODEL.put("81604398626", "11102");//剑侠客的剑皮肤
        MODEL.put("4294987298", "11102");//剑侠客的剑皮肤
        MODEL.put("26199300525602", "11112");//剑侠客的锤子皮肤
        MODEL.put("12884921890", "11112");//剑侠客的锤子皮肤
        MODEL.put("90194333218", "11112");//剑侠客的锤子皮肤
        MODEL.put("26302379740706", "11112");//剑侠客的锤子皮肤
        MODEL.put("1099511647778", "1110201");//剑侠客1坐骑皮肤
        MODEL.put("2199023275554", "1110202");//剑侠客2坐骑皮肤
        MODEL.put("3298534903330", "1110203");//剑侠客3坐骑皮肤
        MODEL.put("4398046531106", "1110204");//剑侠客4坐骑皮肤
        MODEL.put("5497558158882", "1110205");//剑侠客5坐骑皮肤
        MODEL.put("6597069786658", "1110206");//剑侠客6坐骑皮肤
        MODEL.put("7696581414434", "1110207");//剑侠客7坐骑皮肤
        MODEL.put("8796093053410", "1110208");//剑侠客8坐骑皮肤

        // 猛壮士系列
        MODEL.put("20003", "11103");//猛壮士的斧头皮肤
        MODEL.put("17179889187", "11103");
        MODEL.put("94489300515", "11103");
        MODEL.put("26293789806115", "11103");
        MODEL.put("21474856483", "11113");
        MODEL.put("98784267811", "11113");
        MODEL.put("26237955231267", "11113");//猛壮士的拳套皮肤
        MODEL.put("2000305", "11113");
        MODEL.put("1099511647779", "1110301");//猛壮士1坐骑皮肤
        MODEL.put("2199023275555", "1110302");//猛壮士2坐骑皮肤
        MODEL.put("3298534903331", "1110303");//猛壮士3坐骑皮肤
        MODEL.put("4398046531107", "1110304");//猛壮士4坐骑皮肤
        MODEL.put("5497558158883", "1110305");//猛壮士5坐骑皮肤
        MODEL.put("6597069786659", "1110306");//猛壮士6坐骑皮肤
        MODEL.put("7696581414435", "1110307");//猛壮士7坐骑皮肤
        MODEL.put("8796093053411", "1110308");

        // 飞燕女系列
        MODEL.put("20004", "12102");//飞燕女的鞭子皮肤
        MODEL.put("34359758372", "12102");//飞燕女的钩子皮肤
        MODEL.put("111669169700", "12102");//飞燕女的钩子皮肤
        MODEL.put("26207890460196", "12102");//飞燕女的钩子皮肤
        MODEL.put("73014464036", "12102");//飞燕女的钩子皮肤
        MODEL.put("115964136996", "12112");//飞燕女的鞭子皮肤
        MODEL.put("38654725668", "12112");//飞燕女的鞭子皮肤
        MODEL.put("2000409", "12112");//飞燕女的鞭子皮肤
        MODEL.put("30120605666852", "12102");//飞燕女的钩子皮肤
        MODEL.put("1099511647780", "1210201");//飞燕女1坐骑皮肤
        MODEL.put("2199023275556", "1210202");//飞燕女2坐骑皮肤
        MODEL.put("3298534903332", "1210203");//飞燕女3坐骑皮肤
        MODEL.put("4398046531108", "1210204");//飞燕女4坐骑皮肤
        MODEL.put("5497558158884", "1210205");//飞燕女5坐骑皮肤
        MODEL.put("6597069786660", "1210206");//飞燕女6坐骑皮肤
        MODEL.put("7696581414436", "1210207");//飞燕女7坐骑皮肤
        MODEL.put("8796093053412", "1210208");

        // 英女侠系列
        MODEL.put("20005", "12113");//英女侠的刀皮肤
        MODEL.put("42949692965", "12113");
        MODEL.put("120259104293", "12113");
        MODEL.put("26276609936933", "12113");
        MODEL.put("107374202405", "12103");
        MODEL.put("2000507", "12103");//英女侠的棍皮肤
        MODEL.put("30064791077", "12103");
        MODEL.put("26212185427493", "12103");
        MODEL.put("1099511647781", "1210301");//英女侠1坐骑皮肤
        MODEL.put("2199023275557", "1210302");//英女侠2坐骑皮肤
        MODEL.put("3298534903333", "1210303");//英女侠3坐骑皮肤
        MODEL.put("4398046531109", "1210304");//英女侠4坐骑皮肤
        MODEL.put("5497558158885", "1210305");//英女侠5坐骑皮肤
        MODEL.put("6597069786661", "1210306");//英女侠6坐骑皮肤
        MODEL.put("7696581414437", "1210307");//英女侠7坐骑皮肤
        MODEL.put("8796093053413", "1210308");

        // 俏千金系列
        MODEL.put("20006", "12101");//俏千金的刀皮肤
        MODEL.put("120259104294", "12101");
        MODEL.put("42949692966", "12101");
        MODEL.put("26276609936934", "12101");
        MODEL.put("47244660262", "12101");
        MODEL.put("2000612", "12111");
        MODEL.put("51539627558", "12111");//俏千金的枪皮肤
        MODEL.put("128849038886", "12111");
        MODEL.put("26216480394790", "12111");
        MODEL.put("1099511647782", "1210101");//俏千金1坐骑皮肤
        MODEL.put("2199023275558", "1210102");//俏千金2坐骑皮肤
        MODEL.put("3298534903334", "1210103");//俏千金3坐骑皮肤
        MODEL.put("4398046531110", "1210104");//俏千金4坐骑皮肤
        MODEL.put("5497558158886", "1210105");//俏千金5坐骑皮肤
        MODEL.put("6597069786662", "1210106");//俏千金6坐骑皮肤
        MODEL.put("7696581414438", "1210107");//俏千金7坐骑皮肤
        MODEL.put("8796093053414", "1210108");

        // 飞剑侠系列
        MODEL.put("20007", "11104");//飞剑侠的剑皮肤
        MODEL.put("81604398631", "11104");
        MODEL.put("4294987303", "11104");
        MODEL.put("26199300525607", "11104");
        MODEL.put("98784267815", "11114");//飞剑侠的拳套皮肤
        MODEL.put("21474856487", "11114");
        MODEL.put("1099511647783", "1110401");//飞剑侠1坐骑皮肤
        MODEL.put("2199023275559", "1110402");//飞剑侠2坐骑皮肤
        MODEL.put("3298534903335", "1110403");//飞剑侠3坐骑皮肤
        MODEL.put("4398046531111", "1110404");//飞剑侠4坐骑皮肤
        MODEL.put("5497558158887", "1110405");//飞剑侠5坐骑皮肤
        MODEL.put("6597069786663", "1110406");//飞剑侠6坐骑皮肤
        MODEL.put("7696581414439", "1110407");//飞剑侠7坐骑皮肤
        MODEL.put("8796093053415", "1110408");

        // 燕山雪系列
        MODEL.put("20008", "12104");//燕山雪的剑皮肤
        MODEL.put("4294987304", "12104");
        MODEL.put("81604398632", "12104");
        MODEL.put("26199300525608", "12104");
        MODEL.put("120259104296", "12114");//燕山雪的刀皮肤
        MODEL.put("42949692968", "12114");
        MODEL.put("26276609936936", "12114");
        MODEL.put("1099511647784", "1210401");//燕山雪1坐骑皮肤
        MODEL.put("2199023275560", "1210402");//燕山雪2坐骑皮肤
        MODEL.put("3298534903336", "1210403");//燕山雪3坐骑皮肤
        MODEL.put("4398046531112", "1210404");//燕山雪4坐骑皮肤
        MODEL.put("5497558158888", "1210405");//燕山雪5坐骑皮肤
        MODEL.put("6597069786664", "1210406");//燕山雪6坐骑皮肤
        MODEL.put("7696581414440", "1210407");//燕山雪7坐骑皮肤
        MODEL.put("8796093053416", "1210408");

        // 纯阳子系列
        MODEL.put("20009", "11105");//纯阳子的扇子皮肤
        MODEL.put("85899365929", "11105");
        MODEL.put("8589954601", "11105");
        MODEL.put("26225070329385", "11105");
        MODEL.put("103079235113", "11115");
        MODEL.put("25769823785", "11115");//纯阳子的书皮肤
        MODEL.put("1099511647785", "1110501");//纯阳子1坐骑皮肤
        MODEL.put("2199023275561", "1110502");//纯阳子2坐骑皮肤
        MODEL.put("3298534903337", "1110503");//纯阳子3坐骑皮肤
        MODEL.put("4398046531113", "1110504");//纯阳子4坐骑皮肤
        MODEL.put("5497558158889", "1110505");//纯阳子5坐骑皮肤
        MODEL.put("6597069786665", "1110506");//纯阳子6坐骑皮肤
        MODEL.put("7696581414441", "1110507");//纯阳子7坐骑皮肤
        MODEL.put("8796093053417", "1110508");

        // 红拂女系列
        MODEL.put("20010", "12105");//红拂女的剑皮肤
        MODEL.put("81604398634", "12105");
        MODEL.put("4294987306", "12105");
        MODEL.put("6936372203050", "12105");
        MODEL.put("26199300525610", "12105");
        MODEL.put("73014464042", "12115");
        MODEL.put("111669169706", "12115");
        MODEL.put("34359758378", "12115");//红拂女的鞭子皮肤
        MODEL.put("26207890460202", "12115");
        MODEL.put("26207890460202", "12105");//红拂女的鞭子皮肤
        MODEL.put("1099511647786", "1210501");//红拂女1坐骑皮肤
        MODEL.put("2199023275562", "1210502");//红拂女2坐骑皮肤
        MODEL.put("3298534903338", "1210503");//红拂女3坐骑皮肤
        MODEL.put("4398046531114", "1210504");//红拂女4坐骑皮肤
        MODEL.put("5497558158890", "1210505");//红拂女5坐骑皮肤
        MODEL.put("6597069786666", "1210506");//红拂女6坐骑皮肤
        MODEL.put("8796093053418", "1210508");

        // 神秀生系列
        MODEL.put("20011", "20011");//神秀生的剑皮肤
        MODEL.put("2001101", "20011");//神秀生的剑皮肤
        MODEL.put("2001102", "200111");//神秀生的棍皮肤
        MODEL.put("30064791083", "200111");//神秀生的棍皮肤
        MODEL.put("25769825785", "20011");//神秀生的剑皮肤
        MODEL.put("4294987307", "20011");//神秀生的剑皮肤
        MODEL.put("1099511647787", "2001101");//神秀生1坐骑皮肤
        MODEL.put("2199023275563", "2001102");//神秀生2坐骑皮肤
        MODEL.put("3298534903339", "2001103");//神秀生3坐骑皮肤
        MODEL.put("4398046531115", "2001104");//神秀生4坐骑皮肤
        MODEL.put("5497558158891", "2001105");//神秀生5坐骑皮肤
        MODEL.put("6597069786667", "2001106");//神秀生6坐骑皮肤
        MODEL.put("7696581414443", "2001107");//神秀生7坐骑皮肤
        MODEL.put("8796093053419", "2001108");//神秀生8坐骑皮肤

        // 玲珑女系列
        MODEL.put("20012", "20012");//玲珑女的刀皮肤
        MODEL.put("34359758380", "200121");//玲珑女的鞭子皮肤
        MODEL.put("73014464044", "200121");//玲珑女的鞭子皮肤
        MODEL.put("26207890465502", "20012");//玲珑女的刀皮肤
        MODEL.put("42949692972", "20012");//玲珑女的刀皮肤
        MODEL.put("1099511647788", "2001201");//玲珑女1坐骑皮肤
        MODEL.put("2199023275564", "2001202");//玲珑女2坐骑皮肤
        MODEL.put("3298534903340", "2001203");//玲珑女3坐骑皮肤
        MODEL.put("4398046531116", "2001204");//玲珑女4坐骑皮肤
        MODEL.put("5497558158892", "2001205");//玲珑女5坐骑皮肤
        MODEL.put("6597069786668", "2001206");//玲珑女6坐骑皮肤
        MODEL.put("7696581414444", "2001207");//玲珑女7坐骑皮肤
        MODEL.put("8796093053420", "2001208");//玲珑女8坐骑皮肤

        // 虎头怪系列
        MODEL.put("21001", "21101");//虎头怪的棍皮肤
        MODEL.put("30064792073", "21101");
        MODEL.put("107374203401", "21101");
        MODEL.put("26212185428489", "21101");
        MODEL.put("128849039881", "21111");
        MODEL.put("2100112", "21111");//虎头怪的枪皮肤
        MODEL.put("51539628553", "21111");
        MODEL.put("26216480395785", "21111");
        MODEL.put("1099511648777", "2110101");//虎头怪1坐骑皮肤
        MODEL.put("2199023276553", "2110102");//虎头怪2坐骑皮肤
        MODEL.put("3298534904329", "2110103");//虎头怪3坐骑皮肤
        MODEL.put("4398046532105", "2110104");//虎头怪4坐骑皮肤
        MODEL.put("5497558159881", "2110105");//虎头怪5坐骑皮肤
        MODEL.put("6597069787657", "2110106");//虎头怪6坐骑皮肤
        MODEL.put("7696581415433", "2110107");//虎头怪7坐骑皮肤
        MODEL.put("8796093054409", "2110108");

        // 夺命妖系列
        MODEL.put("21002", "21103");//夺命妖的刀皮肤
        MODEL.put("42949693962", "21103");
        MODEL.put("120259105290", "21103");
        MODEL.put("26276609937930", "21103");
        MODEL.put("2100213", "21113");//夺命妖的幡皮肤
        MODEL.put("55834595850", "21113");
        MODEL.put("133144007178", "21113");
        MODEL.put("26233660264970", "21113");
        MODEL.put("1099511648778", "2110301");//夺命妖1坐骑皮肤
        MODEL.put("2199023276554", "2110302");//夺命妖2坐骑皮肤
        MODEL.put("3298534904330", "2110303");//夺命妖3坐骑皮肤
        MODEL.put("4398046532106", "2110304");//夺命妖4坐骑皮肤
        MODEL.put("5497558159882", "2110305");//夺命妖5坐骑皮肤
        MODEL.put("6597069787658", "2110306");//夺命妖6坐骑皮肤
        MODEL.put("7696581415434", "2110307");//夺命妖7坐骑皮肤
        MODEL.put("8796093054410", "2110308");

        // 巨魔王系列
        MODEL.put("21003", "21102");//巨魔王的枪皮肤
        MODEL.put("120259105291", "21112");//巨魔王的刀皮肤
        MODEL.put("42949693963", "21112");
        MODEL.put("26276609937931", "21112");
        MODEL.put("2100312", "21102");
        MODEL.put("51539628555", "21102");
        MODEL.put("128849039883", "21102");
        MODEL.put("26216480395787", "21102");
        MODEL.put("1099511648779", "2110201");//巨魔王1坐骑皮肤
        MODEL.put("2199023276555", "2110202");//巨魔王2坐骑皮肤
        MODEL.put("3298534904331", "2110203");//巨魔王3坐骑皮肤
        MODEL.put("4398046532107", "2110204");//巨魔王4坐骑皮肤
        MODEL.put("5497558159883", "2110205");//巨魔王5坐骑皮肤
        MODEL.put("6597069787659", "2110206");//巨魔王6坐骑皮肤
        MODEL.put("7696581415435", "2110207");//巨魔王7坐骑皮肤
        MODEL.put("8796093054411", "2110208");

        // 小蛮妖系列
        MODEL.put("21004", "22103");//小蛮妖的刀皮肤
        MODEL.put("120259105292", "22103");
        MODEL.put("42949693964", "22103");
        MODEL.put("26276609937932", "22103");
        MODEL.put("38654726668", "22113");//小蛮妖的钩子皮肤
        MODEL.put("115964137996", "22113");
        MODEL.put("26220775363084", "22113");
        MODEL.put("2100409", "22113");
        MODEL.put("1099511648780", "2210301");//小蛮妖1坐骑皮肤
        MODEL.put("2199023276556", "2210302");//小蛮妖2坐骑皮肤
        MODEL.put("3298534904332", "2210303");//小蛮妖3坐骑皮肤
        MODEL.put("4398046532108", "2210304");//小蛮妖4坐骑皮肤
        MODEL.put("5497558159884", "2210305");//小蛮妖5坐骑皮肤
        MODEL.put("6597069787660", "2210306");//小蛮妖6坐骑皮肤
        MODEL.put("7696581415436", "2210307");//小蛮妖7坐骑皮肤
        MODEL.put("8796093054412", "2210308");

        // 骨精灵系列
        MODEL.put("21005", "22102");//骨精灵的剑皮肤
        MODEL.put("4294988301", "22102");
        MODEL.put("81604399629", "22102");
        MODEL.put("26199300526605", "22102");
        MODEL.put("2100507", "22112");//骨精灵的棍皮肤
        MODEL.put("30064792077", "22112");
        MODEL.put("107374203405", "22112");
        MODEL.put("26212185428493", "22112");
        MODEL.put("1099511648781", "2210201");//骨精灵1坐骑皮肤
        MODEL.put("2199023276557", "2210202");//骨精灵2坐骑皮肤
        MODEL.put("3298534904333", "2210203");//骨精灵3坐骑皮肤
        MODEL.put("4398046532109", "2210204");//骨精灵4坐骑皮肤
        MODEL.put("5497558159885", "2210205");//骨精灵5坐骑皮肤
        MODEL.put("6597069787661", "2210206");//骨精灵6坐骑皮肤
        MODEL.put("7696581415437", "2210207");//骨精灵7坐骑皮肤
        MODEL.put("8796093054413", "2210208");

        // 狐美人系列
        MODEL.put("21006", "22101");//狐美人的鞭子皮肤
        MODEL.put("111669170702", "22101");
        MODEL.put("2100608", "22101");
        MODEL.put("34359759374", "22101");
        MODEL.put("26207890461198", "22101");
        MODEL.put("60129563150", "22111");//狐美人的爪子皮肤
        MODEL.put("9878424801806", "22111");
        MODEL.put("21006", "22111");
        MODEL.put("1099511648782", "2210101");//狐美人1坐骑皮肤
        MODEL.put("2199023276558", "2210102");//狐美人2坐骑皮肤
        MODEL.put("3298534904334", "2210103");//狐美人3坐骑皮肤
        MODEL.put("4398046532110", "2210104");//狐美人4坐骑皮肤
        MODEL.put("5497558159886", "2210105");//狐美人5坐骑皮肤
        MODEL.put("6597069787662", "2210106");//狐美人6坐骑皮肤
        MODEL.put("7696581415438", "2210107");//狐美人7坐骑皮肤
        MODEL.put("8796093042226", "2210108");

        // 逆天魔系列
        MODEL.put("21007", "21104");//逆天魔的枪皮肤
        MODEL.put("128849039887", "21104");
        MODEL.put("51539628559", "21104");
        MODEL.put("26216480395791", "21104");
        MODEL.put("17179890191", "21114");//逆天魔的斧头皮肤
        MODEL.put("94489301519", "21114");
        MODEL.put("5166845678095", "21114");
        MODEL.put("1099511648783", "2110401");//逆天魔1坐骑皮肤
        MODEL.put("2199023276559", "2110402");//逆天魔2坐骑皮肤
        MODEL.put("3298534904335", "2110403");//逆天魔3坐骑皮肤
        MODEL.put("4398046532111", "2110404");//逆天魔4坐骑皮肤
        MODEL.put("5497558159887", "2110405");//逆天魔5坐骑皮肤
        MODEL.put("6597069787663", "2110406");//逆天魔6坐骑皮肤
        MODEL.put("7696581415439", "2110407");//逆天魔7坐骑皮肤
        MODEL.put("8796093054415", "2110408");

        // 媚灵狐系列
        MODEL.put("21008", "22114");
        MODEL.put("2100811", "22114");//媚灵狐的双环皮肤
        MODEL.put("2100810", "22104");//媚灵狐的刀皮肤
        MODEL.put("120259105296", "22104");
        MODEL.put("42949693968", "22104");
        MODEL.put("26276609937936", "22104");
        MODEL.put("124554072592", "22114");
        MODEL.put("47244661264", "22114");
        MODEL.put("30146375471632", "22114");
        MODEL.put("1099511648784", "2210401");//媚灵狐1坐骑皮肤
        MODEL.put("2199023276560", "2210402");//媚灵狐2坐骑皮肤
        MODEL.put("3298534904336", "2210403");//媚灵狐3坐骑皮肤
        MODEL.put("4398046532112", "2210404");//媚灵狐4坐骑皮肤
        MODEL.put("5497558159888", "2210405");//媚灵狐5坐骑皮肤
        MODEL.put("6597069787664", "2210406");//媚灵狐6坐骑皮肤
        MODEL.put("7696581415440", "2210407");//媚灵狐7坐骑皮肤
        MODEL.put("8796093054416", "2210408");

        // 混天魔系列
        MODEL.put("21009", "21105");//混天魔的刀皮肤
        MODEL.put("120259105297", "21105");
        MODEL.put("42949693969", "21105");
        MODEL.put("26276609937937", "21105");
        MODEL.put("17179890193", "21115");//混天魔的斧头皮肤
        MODEL.put("94489301521", "21115");
        MODEL.put("30159260373521", "21105");
        MODEL.put("1099511648785", "2110501");//混天魔1坐骑皮肤
        MODEL.put("2199023276561", "2110502");//混天魔2坐骑皮肤
        MODEL.put("3298534904337", "2110503");//混天魔3坐骑皮肤
        MODEL.put("4398046532113", "2110504");//混天魔4坐骑皮肤
        MODEL.put("5497558159889", "2110505");//混天魔5坐骑皮肤
        MODEL.put("6597069787665", "2110506");//混天魔6坐骑皮肤
        MODEL.put("7696581415441", "2110507");//混天魔7坐骑皮肤
        MODEL.put("8796093054417", "2110508");

        // 九尾狐系列
        MODEL.put("21010", "22105");//九尾狐的爪子皮肤
        MODEL.put("43001", "22105");
        MODEL.put("2101009", "22115");//九尾狐的钩子皮肤
        MODEL.put("60129563154", "22105");
        MODEL.put("9878424801810", "22105");
        MODEL.put("115964138002", "22115");
        MODEL.put("30120605667858", "22115");
        MODEL.put("1099511648786", "2210501");//九尾狐1坐骑皮肤
        MODEL.put("2199023276562", "2210502");//九尾狐2坐骑皮肤
        MODEL.put("3298534904338", "2210503");//九尾狐3坐骑皮肤
        MODEL.put("4398046532114", "2210504");//九尾狐4坐骑皮肤
        MODEL.put("5497558159890", "2210505");//九尾狐5坐骑皮肤
        MODEL.put("6597069787666", "2210506");//九尾狐6坐骑皮肤
        MODEL.put("7696581415442", "2210507");//九尾狐7坐骑皮肤
        MODEL.put("8796093054418", "2210508");

        // 绝影魔系列
        MODEL.put("21011", "21011");//绝影魔的刀皮肤
        MODEL.put("42949693971", "210110");//绝影魔的枪皮肤
        MODEL.put("51539628563", "21011");//绝影魔的刀皮肤
        MODEL.put("3015926037352", "21011");//绝影魔的刀皮肤
        MODEL.put("1099511648787", "2101101");//绝影魔1坐骑皮肤
        MODEL.put("2199023276563", "2101102");//绝影魔2坐骑皮肤
        MODEL.put("3298534904339", "2101103");//绝影魔3坐骑皮肤
        MODEL.put("4398046532115", "2101104");//绝影魔4坐骑皮肤
        MODEL.put("5497558159891", "2101105");//绝影魔5坐骑皮肤
        MODEL.put("6597069787667", "2101106");//绝影魔6坐骑皮肤
        MODEL.put("7696581415443", "2101107");//绝影魔7坐骑皮肤
        MODEL.put("8796093054419", "2101108");//绝影魔8坐骑皮肤

        // 霜月灵系列
        MODEL.put("21012", "21012");//霜月灵的钩子皮肤
        MODEL.put("21474857492", "21012");//霜月灵的钩子皮肤
        MODEL.put("38654726676", "21012");//霜月灵的钩子皮肤
        MODEL.put("42949693972", "2101210");//霜月灵的爪子皮肤
        MODEL.put("1159641325552", "21012");//霜月灵的钩子皮肤
        MODEL.put("1099511648788", "2101201");//霜月灵1坐骑皮肤
        MODEL.put("2199023276564", "2101202");//霜月灵2坐骑皮肤
        MODEL.put("3298534904340", "2101203");//霜月灵3坐骑皮肤
        MODEL.put("4398046532116", "2101204");//霜月灵4坐骑皮肤
        MODEL.put("5497558159892", "2101205");//霜月灵5坐骑皮肤
        MODEL.put("6597069787668", "2101206");//霜月灵6坐骑皮肤
        MODEL.put("7696581415444", "2101207");//霜月灵7坐骑皮肤
        MODEL.put("8796093054420", "2101208");//霜月灵8坐骑皮肤

        // 神天兵系列
        MODEL.put("22001", "31101");//神天兵的枪皮肤
        MODEL.put("2200112", "31101");
        MODEL.put("128849040881", "31101");
        MODEL.put("51539629553", "31101");
        MODEL.put("26216480396785", "31101");
        MODEL.put("47244662257", "31111");//神天兵的锤子皮肤
        MODEL.put("90194335217", "31111");//神天兵的锤子皮肤
        MODEL.put("12884923889", "31111");
        MODEL.put("26302379742705", "31111");
        MODEL.put("1099511649777", "3110101");//神天兵1坐骑皮肤
        MODEL.put("2199023277553", "3110102");//神天兵2坐骑皮肤
        MODEL.put("3298534905329", "3110103");//神天兵3坐骑皮肤
        MODEL.put("4398046533105", "3110104");//神天兵4坐骑皮肤
        MODEL.put("5497558160881", "3110105");//神天兵5坐骑皮肤
        MODEL.put("6597069788657", "3110106");//神天兵6坐骑皮肤
        MODEL.put("7696581416433", "3110107");//神天兵7坐骑皮肤
        MODEL.put("8796093055409", "3110108");

        // 智圣仙系列
        MODEL.put("22002", "31112");//智圣仙的剑皮肤
        MODEL.put("81604400626", "31112");
        MODEL.put("4294989298", "31112");
        MODEL.put("2200201", "31112");
        MODEL.put("26199300527602", "31112");
        MODEL.put("64424531442", "31102");//智圣仙的拂尘皮肤
        MODEL.put("26272314971634", "31102");
        MODEL.put("1099511649778", "3110201");//智圣仙1坐骑皮肤
        MODEL.put("2199023277554", "3110202");//智圣仙2坐骑皮肤
        MODEL.put("3298534905330", "3110203");//智圣仙3坐骑皮肤
        MODEL.put("4398046533106", "3110204");//智圣仙4坐骑皮肤
        MODEL.put("5497558160882", "3110205");//智圣仙5坐骑皮肤
        MODEL.put("6597069788658", "3110206");//智圣仙6坐骑皮肤
        MODEL.put("7696581416434", "3110207");//智圣仙7坐骑皮肤
        MODEL.put("8796093055410", "3110208");

        // 龙战将系列
        MODEL.put("22003", "400515");//龙战将的爪子皮肤
        MODEL.put("2200303", "31103");//龙战将的棍皮肤
        MODEL.put("30103425799667", "31103");
        MODEL.put("26212185429491", "31103");
        MODEL.put("107374204403", "31103");
        MODEL.put("30064793075", "31103");
        MODEL.put("2200314", "400515");
        MODEL.put("137438975475", "400515");
        MODEL.put("47244662259", "400515");
        MODEL.put("60129564147", "400515");
        MODEL.put("9878424802803", "400515");
        MODEL.put("30107720766963", "400515");
        MODEL.put("1099511649779", "3110301");//龙战将1坐骑皮肤
        MODEL.put("2199023277555", "3110302");//龙战将2坐骑皮肤
        MODEL.put("3298534905331", "3110303");//龙战将3坐骑皮肤
        MODEL.put("4398046533107", "3110304");//龙战将4坐骑皮肤
        MODEL.put("5497558160883", "3110305");//龙战将5坐骑皮肤
        MODEL.put("6597069788659", "3110306");//龙战将6坐骑皮肤
        MODEL.put("7696581416435", "3110307");//龙战将7坐骑皮肤
        MODEL.put("8796093055411", "3110308");

        // 精灵仙系列
        MODEL.put("22004", "32103");//精灵仙的刀皮肤
        MODEL.put("120259106292", "32103");//精灵仙的拳套皮肤
        MODEL.put("42949694964", "32103");
        MODEL.put("21474858484", "32113");
        MODEL.put("2200405", "32113");
        MODEL.put("98784269812", "32113");
        MODEL.put("1099511649780", "3210301");//精灵仙1坐骑皮肤
        MODEL.put("2199023277556", "3210302");//精灵仙2坐骑皮肤
        MODEL.put("3298534905332", "3210303");//精灵仙3坐骑皮肤
        MODEL.put("4398046533108", "3210304");//精灵仙4坐骑皮肤
        MODEL.put("5497558160884", "3210305");//精灵仙5坐骑皮肤
        MODEL.put("6597069788660", "3210306");//精灵仙6坐骑皮肤
        MODEL.put("7696581416436", "3210307");//精灵仙7坐骑皮肤
        MODEL.put("8796093055412", "3210308");

        // 舞天姬系列
        MODEL.put("22005", "32101");//舞天姬的棍皮肤
        MODEL.put("30064793077", "32101");
        MODEL.put("107374204405", "32101");
        MODEL.put("68719498741", "32111");//舞天姬的丝带皮肤
        MODEL.put("146028910069", "32111");
        MODEL.put("2200516", "32111");
        MODEL.put("1099511649781", "3210101");//舞天姬1坐骑皮肤
        MODEL.put("2199023277557", "3210102");//舞天姬2坐骑皮肤
        MODEL.put("3298534905333", "3210103");//舞天姬3坐骑皮肤
        MODEL.put("4398046533109", "3210104");//舞天姬4坐骑皮肤
        MODEL.put("5497558160885", "3210105");//舞天姬5坐骑皮肤
        MODEL.put("6597069788661", "3210106");//舞天姬6坐骑皮肤
        MODEL.put("7696581416437", "3210107");//舞天姬7坐骑皮肤
        MODEL.put("8796093055413", "3210108");

        // 玄剑娥系列
        MODEL.put("22006", "32102");//玄剑娥的枪皮肤
        MODEL.put("81604400630", "32112");//玄剑娥的剑皮肤
        MODEL.put("4294989302", "32112");
        MODEL.put("51539629558", "32102");
        MODEL.put("2200612", "32102");
        MODEL.put("128849040886", "32102");
        MODEL.put("1099511649782", "3210201");//玄剑娥1坐骑皮肤
        MODEL.put("2199023277558", "3210202");//玄剑娥2坐骑皮肤
        MODEL.put("3298534905334", "3210203");//玄剑娥3坐骑皮肤
        MODEL.put("4398046533110", "3210204");//玄剑娥4坐骑皮肤
        MODEL.put("5497558160886", "3210205");//玄剑娥5坐骑皮肤
        MODEL.put("6597069788662", "3210206");//玄剑娥6坐骑皮肤
        MODEL.put("7696581416438", "3210207");//玄剑娥7坐骑皮肤
        MODEL.put("8796093055414", "3210208");

        // 武尊神系列
        MODEL.put("22007", "31114");//武尊神的爪子皮肤
        MODEL.put("2200713", "31114");
        MODEL.put("2200711", "31104");//武尊神的枪皮肤
        MODEL.put("128849040887", "31104");
        MODEL.put("47244662263", "31114");
        MODEL.put("51539629559", "31104");
        MODEL.put("60129564151", "31114");
        MODEL.put("137438975479", "31114");
        MODEL.put("1099511649783", "3110401");//武尊神1坐骑皮肤
        MODEL.put("2199023277559", "3110402");//武尊神2坐骑皮肤
        MODEL.put("3298534905335", "3110403");//武尊神3坐骑皮肤
        MODEL.put("4398046533111", "3110404");//武尊神4坐骑皮肤
        MODEL.put("5497558160887", "3110405");//武尊神5坐骑皮肤
        MODEL.put("6597069788663", "3110406");//武尊神6坐骑皮肤
        MODEL.put("7696581416439", "3110407");//武尊神7坐骑皮肤
        MODEL.put("8796093055415", "3110408");

        // 玄天姬系列
        MODEL.put("22008", "32104");//玄天姬的丝带皮肤
        MODEL.put("2200811", "32114");//玄天姬的双环皮肤
        MODEL.put("47244662264", "32114");
        MODEL.put("124554073592", "32114");
        MODEL.put("146028910072", "32104");
        MODEL.put("68719498744", "32104");
        MODEL.put("1099511649784", "3210401");//玄天姬1坐骑皮肤
        MODEL.put("2199023277560", "3210402");//玄天姬2坐骑皮肤
        MODEL.put("3298534905336", "3210403");//玄天姬3坐骑皮肤
        MODEL.put("4398046533112", "3210404");//玄天姬4坐骑皮肤
        MODEL.put("5497558160888", "3210405");//玄天姬5坐骑皮肤
        MODEL.put("6597069788664", "3210406");//玄天姬6坐骑皮肤
        MODEL.put("7696581416440", "3210407");//玄天姬7坐骑皮肤
        MODEL.put("8796093055416", "3210408");

        // 紫薇神系列
        MODEL.put("22009", "31105");//紫薇神的剑皮肤
        MODEL.put("2200901", "31105");
        MODEL.put("2200915", "31115");//紫薇神的幡皮肤
        MODEL.put("81604400633", "31105");
        MODEL.put("4294989305", "31105");
        MODEL.put("55834596857", "31115");
        MODEL.put("133144008185", "31115");
        MODEL.put("2200900", "31105");
        MODEL.put("2200901", "31105");
        MODEL.put("2200902", "31105");
        MODEL.put("2200910", "31115");
        MODEL.put("2200915", "31115");
        MODEL.put("2200916", "31115");
        MODEL.put("1099511649785", "3110501");//紫薇神1坐骑皮肤
        MODEL.put("2199023277561", "3110502");//紫薇神2坐骑皮肤
        MODEL.put("3298534905337", "3110503");//紫薇神3坐骑皮肤
        MODEL.put("4398046533113", "3110504");//紫薇神4坐骑皮肤
        MODEL.put("5497558160889", "3110505");//紫薇神5坐骑皮肤
        MODEL.put("6597069788665", "3110506");//紫薇神6坐骑皮肤
        MODEL.put("7696581416441", "3110507");//紫薇神7坐骑皮肤
        MODEL.put("8796093055417", "3110508");

        // 霓裳仙系列
        MODEL.put("22010", "32115");//霓裳仙的灯笼皮肤
        MODEL.put("2201017", "32115");//霓裳仙的丝带皮肤
        MODEL.put("2201016", "32105");
        MODEL.put("146028910074", "32105");
        MODEL.put("68719498746", "32105");
        MODEL.put("73014466042", "32115");
        MODEL.put("150323877370", "32115");
        MODEL.put("1099511649786", "3210501");//霓裳仙1坐骑皮肤
        MODEL.put("2199023277562", "3210502");//霓裳仙2坐骑皮肤
        MODEL.put("3298534905338", "3210503");//霓裳仙3坐骑皮肤
        MODEL.put("4398046533114", "3210504");//霓裳仙4坐骑皮肤
        MODEL.put("5497558160890", "3210505");//霓裳仙5坐骑皮肤
        MODEL.put("6597069788666", "3210506");//霓裳仙6坐骑皮肤
        MODEL.put("7696581416442", "3210507");//霓裳仙7坐骑皮肤
        MODEL.put("8796093055418", "3210508");

        // 青阳使系列
        MODEL.put("22011", "22011");//青阳使的枪皮肤
        MODEL.put("30064793083", "22011");//青阳使的枪皮肤
        MODEL.put("51539629563", "220111");//青阳使的棍皮肤
        MODEL.put("5583455585755", "22011");//青阳使的枪皮肤
        MODEL.put("1099511649787", "2201101");//青阳使1坐骑皮肤
        MODEL.put("2199023277563", "2201102");//青阳使2坐骑皮肤
        MODEL.put("3298534905339", "2201103");//青阳使3坐骑皮肤
        MODEL.put("4398046533115", "2201104");//青阳使4坐骑皮肤
        MODEL.put("5497558160891", "2201105");//青阳使5坐骑皮肤
        MODEL.put("6597069788667", "2201106");//青阳使6坐骑皮肤
        MODEL.put("7696581416443", "2201107");//青阳使7坐骑皮肤
        MODEL.put("8796093055419", "2201108");//青阳使8坐骑皮肤

        // 云中君系列
        MODEL.put("22012", "220121");//云中君的双环皮肤
        MODEL.put("2201216", "22012");//云中君的飘带皮肤
        MODEL.put("73014465542", "22012");//云中君的飘带皮肤
        MODEL.put("68719498748", "22012");//云中君的飘带皮肤
        MODEL.put("150323855370", "22012");//云中君的飘带皮肤
        MODEL.put("2201211", "220121");//云中君的双环皮肤
        MODEL.put("47244662268", "220121");//云中君的双环皮肤
        MODEL.put("1099511649788", "2201201");//云中君1坐骑皮肤
        MODEL.put("2199023277564", "2201202");//云中君2坐骑皮肤
        MODEL.put("3298534905340", "2201203");//云中君3坐骑皮肤
        MODEL.put("4398046533116", "2201204");//云中君4坐骑皮肤
        MODEL.put("5497558160892", "2201205");//云中君5坐骑皮肤
        MODEL.put("6597069788668", "2201206");//云中君6坐骑皮肤
        MODEL.put("7696581416444", "2201207");//云中君7坐骑皮肤
        MODEL.put("8796093055420", "2201208");//云中君8坐骑皮肤

        // 祭剑魂系列
        MODEL.put("23001", "41101");
        MODEL.put("4294990297", "41101");
        MODEL.put("81604401625", "41101");
        MODEL.put("2300101", "41101");
        MODEL.put("42949695961", "41111");
        MODEL.put("120259107289", "41111");
        MODEL.put("1099511650777", "4110101");//祭剑魂1坐骑皮肤
        MODEL.put("2199023278553", "4110102");//祭剑魂2坐骑皮肤
        MODEL.put("3298534906329", "4110103");//祭剑魂3坐骑皮肤
        MODEL.put("4398046534105", "4110104");//祭剑魂4坐骑皮肤
        MODEL.put("5497558161881", "4110105");//祭剑魂5坐骑皮肤
        MODEL.put("6597069789657", "4110106");//祭剑魂6坐骑皮肤
        MODEL.put("7696581417433", "4110107");//祭剑魂7坐骑皮肤
        MODEL.put("8796093056409", "4110108");

        // 猎魂引系列
        MODEL.put("23002", "41103");
        MODEL.put("128849041882", "41103");
        MODEL.put("51539630554", "41103");
        MODEL.put("2300205", "41113");
        MODEL.put("21474859482", "41113");
        MODEL.put("98784270810", "41113");
        MODEL.put("1099511650778", "4110301");//猎魂引1坐骑皮肤
        MODEL.put("2199023278554", "4110302");//猎魂引2坐骑皮肤
        MODEL.put("3298534906330", "4110303");//猎魂引3坐骑皮肤
        MODEL.put("4398046534106", "4110304");//猎魂引4坐骑皮肤
        MODEL.put("5497558161882", "4110305");//猎魂引5坐骑皮肤
        MODEL.put("6597069789658", "4110306");//猎魂引6坐骑皮肤
        MODEL.put("7696581417434", "4110307");//猎魂引7坐骑皮肤
        MODEL.put("8796093056410", "4110308");

        // 无崖子系列
        MODEL.put("23003", "41102");
        MODEL.put("25769826779", "41102");
        MODEL.put("103079238107", "41102");
        MODEL.put("2300306", "41102");
        MODEL.put("55834597851", "41112");
        MODEL.put("133144009179", "41112");
        MODEL.put("1099511650779", "4110201");//无崖子1坐骑皮肤
        MODEL.put("2199023278555", "4110202");//无崖子2坐骑皮肤
        MODEL.put("3298534906331", "4110203");//无崖子3坐骑皮肤
        MODEL.put("4398046534107", "4110204");//无崖子4坐骑皮肤
        MODEL.put("5497558161883", "4110205");//无崖子5坐骑皮肤
        MODEL.put("6597069789659", "4110206");//无崖子6坐骑皮肤
        MODEL.put("7696581417435", "4110207");//无崖子7坐骑皮肤
        MODEL.put("8796093056411", "4110208");

        // 墨衣行系列
        MODEL.put("23004", "42101");
        MODEL.put("34359761372", "42101");
        MODEL.put("111669172700", "42101");
        MODEL.put("2300409", "42111");
        MODEL.put("38654728668", "42111");
        MODEL.put("115964139996", "42111");
        MODEL.put("1099511650780", "4210101");//墨衣行1坐骑皮肤
        MODEL.put("2199023278556", "4210102");//墨衣行2坐骑皮肤
        MODEL.put("3298534906332", "4210103");//墨衣行3坐骑皮肤
        MODEL.put("4398046534108", "4210104");//墨衣行4坐骑皮肤
        MODEL.put("5497558161884", "4210105");//墨衣行5坐骑皮肤
        MODEL.put("6597069789660", "4210106");//墨衣行6坐骑皮肤
        MODEL.put("7696581417436", "4210107");//墨衣行7坐骑皮肤
        MODEL.put("8796093056412", "4210108");

        // 夜溪灵系列
        MODEL.put("23005", "42102");
        MODEL.put("2300517", "42102");
        MODEL.put("2300511", "42112");
        MODEL.put("73014467037", "42102");
        MODEL.put("150323878365", "42102");
        MODEL.put("47244663261", "42112");
        MODEL.put("124554074589", "42112");
        MODEL.put("1099511650781", "4210201");//夜溪灵1坐骑皮肤
        MODEL.put("2199023278557", "4210202");//夜溪灵2坐骑皮肤
        MODEL.put("3298534906333", "4210203");//夜溪灵3坐骑皮肤
        MODEL.put("4398046534109", "4210204");//夜溪灵4坐骑皮肤
        MODEL.put("5497558161885", "4210205");//夜溪灵5坐骑皮肤
        MODEL.put("6597069789661", "4210206");//夜溪灵6坐骑皮肤
        MODEL.put("7696581417437", "4210207");//夜溪灵7坐骑皮肤
        MODEL.put("8796093056413", "4210208");

        // 幽梦影系列
        MODEL.put("23006", "42103");
        MODEL.put("47244663262", "42113");
        MODEL.put("124554074590", "42113");
        MODEL.put("68719499742", "42103");
        MODEL.put("2300616", "42103");
        MODEL.put("2300611", "42113");
        MODEL.put("146028911070", "42103");
        MODEL.put("1099511650782", "4210301");//幽梦影1坐骑皮肤
        MODEL.put("2199023278558", "4210302");//幽梦影2坐骑皮肤
        MODEL.put("3298534906334", "4210303");//幽梦影3坐骑皮肤
        MODEL.put("4398046534110", "4210304");//幽梦影4坐骑皮肤
        MODEL.put("5497558161886", "4210305");//幽梦影5坐骑皮肤
        MODEL.put("6597069789662", "4210306");//幽梦影6坐骑皮肤
        MODEL.put("7696581417438", "4210307");//幽梦影7坐骑皮肤
        MODEL.put("8796093056414", "4210308");

        // 南冠客系列
        MODEL.put("23007", "23007");//南冠客的剑皮肤
        MODEL.put("4294990303", "23007");//南冠客的剑皮肤
        MODEL.put("42949695967", "2300710");//南冠客的刀皮肤
        MODEL.put("124554075589", "2300710");//南冠客的刀皮肤
        MODEL.put("1099511650783", "2300701");//南冠客1坐骑皮肤
        MODEL.put("2199023278559", "2300702");//南冠客2坐骑皮肤
        MODEL.put("3298534906335", "2300703");//南冠客3坐骑皮肤
        MODEL.put("4398046534111", "2300704");//南冠客4坐骑皮肤
        MODEL.put("5497558161887", "2300705");//南冠客5坐骑皮肤
        MODEL.put("6597069789663", "2300706");//南冠客6坐骑皮肤
        MODEL.put("7696581417439", "2300707");//南冠客7坐骑皮肤
        MODEL.put("8796093056415", "2300708");//南冠客8坐骑皮肤

        // 镜花影系列
        MODEL.put("23008", "23008");//镜花影的剑皮肤
        MODEL.put("68719499744", "2300816");//镜花影的丝带皮肤
        MODEL.put("4294990304", "23008");//镜花影的剑皮肤
        MODEL.put("146028955070", "2300816");//镜花影的丝带皮肤
        MODEL.put("1099511650784", "2300801");//镜花影1坐骑皮肤
        MODEL.put("2199023278560", "2300802");//镜花影2坐骑皮肤
        MODEL.put("3298534906336", "2300803");//镜花影3坐骑皮肤
        MODEL.put("4398046534112", "2300804");//镜花影4坐骑皮肤
        MODEL.put("5497558161888", "2300805");//镜花影5坐骑皮肤
        MODEL.put("6597069789664", "2300806");//镜花影6坐骑皮肤
        MODEL.put("7696581417440", "2300807");//镜花影7坐骑皮肤
        MODEL.put("8796093056416", "2300808");//镜花影8坐骑皮肤

        // 沧浪君系列
        MODEL.put("24001", "2400101");
        MODEL.put("4294991297", "2400101");
        MODEL.put("81604402625", "2400101");
        MODEL.put("25769827777", "2400106");
        MODEL.put("103079239105", "2400106");
        MODEL.put("1099511651777", "24001001");//沧浪君1坐骑皮肤
        MODEL.put("2199023279553", "24001002");//沧浪君2坐骑皮肤
        MODEL.put("3298534907329", "24001003");//沧浪君3坐骑皮肤
        MODEL.put("4398046535105", "24001004");//沧浪君4坐骑皮肤
        MODEL.put("5497558162881", "24001005");//沧浪君5坐骑皮肤
        MODEL.put("6597069790657", "24001006");//沧浪君6坐骑皮肤
        MODEL.put("7696581418433", "24001007");//沧浪君7坐骑皮肤
        MODEL.put("8796093057409", "24001008");

        // 龙渊客系列
        MODEL.put("24002", "2400210");
        MODEL.put("42949696962", "2400210");
        MODEL.put("120259108290", "2400210");
        MODEL.put("51539631554", "2400212");
        MODEL.put("128849042882", "2400212");
        MODEL.put("1099511651778", "24002001");//龙渊客1坐骑皮肤
        MODEL.put("2199023279554", "24002002");//龙渊客2坐骑皮肤
        MODEL.put("3298534907330", "24002003");//龙渊客3坐骑皮肤
        MODEL.put("4398046535106", "24002004");//龙渊客4坐骑皮肤
        MODEL.put("5497558162882", "24002005");//龙渊客5坐骑皮肤
        MODEL.put("6597069790658", "24002006");//龙渊客6坐骑皮肤
        MODEL.put("7696581418434", "24002007");//龙渊客7坐骑皮肤
        MODEL.put("8796093057410", "24002008");

        // 忘忧子系列
        MODEL.put("24003", "2400318");
        MODEL.put("77309435331", "2400318");
        MODEL.put("154618846659", "2400318");
        MODEL.put("2400318", "2400318");
        MODEL.put("124554075587", "2400311");
        MODEL.put("2400311", "2400311");
        MODEL.put("47244664259", "2400311");
        MODEL.put("1099511651779", "24003001");//忘忧子1坐骑皮肤
        MODEL.put("2199023279555", "24003002");//忘忧子2坐骑皮肤
        MODEL.put("3298534907331", "24003003");//忘忧子3坐骑皮肤
        MODEL.put("4398046535107", "24003004");//忘忧子4坐骑皮肤
        MODEL.put("5497558162883", "24003005");//忘忧子5坐骑皮肤
        MODEL.put("6597069790659", "24003006");//忘忧子6坐骑皮肤
        MODEL.put("7696581418435", "24003007");//忘忧子7坐骑皮肤
        MODEL.put("8796093057411", "24003008");

        // 骊珠儿系列
        MODEL.put("24004", "2400403");
        MODEL.put("47244664260", "2400403");
        MODEL.put("12884925892", "2400403");
        MODEL.put("90194337220", "2400403");
        MODEL.put("38654729668", "2400409");
        MODEL.put("115964140996", "2400409");
        MODEL.put("1099511651780", "24004001");//骊珠儿1坐骑皮肤
        MODEL.put("2199023279556", "24004002");//骊珠儿2坐骑皮肤
        MODEL.put("3298534907332", "24004003");//骊珠儿3坐骑皮肤
        MODEL.put("4398046535108", "24004004");//骊珠儿4坐骑皮肤
        MODEL.put("5497558162884", "24004005");//骊珠儿5坐骑皮肤
        MODEL.put("6597069790660", "24004006");//骊珠儿6坐骑皮肤
        MODEL.put("7696581418436", "24004007");//骊珠儿7坐骑皮肤
        MODEL.put("8796093057412", "24004008");

        // 木兰行系列
        MODEL.put("24005", "2400518");
        MODEL.put("77309435333", "2400518");
        MODEL.put("154618846661", "2400518");
        MODEL.put("51539631557", "2400512");
        MODEL.put("128849042885", "2400512");
        MODEL.put("1099511651781", "24005001");//木兰行1坐骑皮肤
        MODEL.put("2199023279557", "24005002");//木兰行2坐骑皮肤
        MODEL.put("3298534907333", "24005003");//木兰行3坐骑皮肤
        MODEL.put("4398046535109", "24005004");//木兰行4坐骑皮肤
        MODEL.put("5497558162885", "24005005");//木兰行5坐骑皮肤
        MODEL.put("6597069790661", "24005006");//木兰行6坐骑皮肤
        MODEL.put("7696581418437", "24005007");//木兰行7坐骑皮肤
        MODEL.put("8796093057413", "24005008");

        // 莫解语系列
        MODEL.put("24006", "2400617");
        MODEL.put("2400601", "2400601");
        MODEL.put("2400617", "2400617");
        MODEL.put("4294991302", "2400601");
        MODEL.put("81604402630", "2400601");
        MODEL.put("73014468038", "2400617");
        MODEL.put("150323879366", "2400617");
        MODEL.put("1099511651782", "24006001");//莫解语1坐骑皮肤
        MODEL.put("2199023279558", "24006002");//莫解语2坐骑皮肤
        MODEL.put("3298534907334", "24006003");//莫解语3坐骑皮肤
        MODEL.put("4398046535110", "24006004");//莫解语4坐骑皮肤
        MODEL.put("5497558162886", "24006005");//莫解语5坐骑皮肤
        MODEL.put("6597069790662", "24006006");//莫解语6坐骑皮肤
        MODEL.put("7696581418438", "24006007");//莫解语7坐骑皮肤
        MODEL.put("8796093057414", "24006008");

        // 游无极系列
        MODEL.put("24007", "24007");//游无极的刀皮肤
        MODEL.put("4294991303", "24007");//游无极的刀皮肤
        MODEL.put("42949696967", "2400710");//游无极的剑皮肤
        MODEL.put("51539635557", "24007");//游无极的刀皮肤
        MODEL.put("1099511651783", "2400701");//游无极1坐骑皮肤
        MODEL.put("2199023279559", "2400702");//游无极2坐骑皮肤
        MODEL.put("3298534907335", "2400703");//游无极3坐骑皮肤
        MODEL.put("4398046535111", "2400704");//游无极4坐骑皮肤
        MODEL.put("5497558162887", "2400705");//游无极5坐骑皮肤
        MODEL.put("6597069790663", "2400706");//游无极6坐骑皮肤
        MODEL.put("7696581418439", "2400707");//游无极7坐骑皮肤
        // 使用预计算的第八坐骑ID
        MODEL.put(String.valueOf(EIGHTH_RIDE_OFFSET | 24007L), "2400708");//游无极8坐骑皮肤

        // 临九渊系列
        MODEL.put("24008", "24008");//临九渊的灯笼皮肤
        MODEL.put("68719500744", "24008");//临九渊的灯笼皮肤
        MODEL.put("73014468040", "24008");//临九渊的飘带皮肤
        MODEL.put("73014465538", "24008");//临九渊的飘带皮肤
        MODEL.put("1099511651784", "2400801");//临九渊1坐骑皮肤
        MODEL.put("2199023279560", "2400802");//临九渊2坐骑皮肤
        MODEL.put("3298534907336", "2400803");//临九渊3坐骑皮肤
        MODEL.put("4398046535112", "2400804");//临九渊4坐骑皮肤
        MODEL.put("5497558162888", "2400805");//临九渊5坐骑皮肤
        MODEL.put("6597069790664", "2400806");//临九渊6坐骑皮肤
        MODEL.put("7696581418440", "2400807");//临九渊7坐骑皮肤
        // 使用预计算的第八坐骑ID
        MODEL.put(String.valueOf(EIGHTH_RIDE_OFFSET | 24008L), "2400808");//临九渊8坐骑皮肤
        // 为其他四转角色也添加第八坐骑
        long[] otherFourTurnModels = {20011L, 20012L, 21011L, 21012L, 22011L, 22012L, 23007L, 23008L};
        for (long modelId : otherFourTurnModels) {
            long eighthRideId = EIGHTH_RIDE_OFFSET | modelId;
            String key = String.valueOf(eighthRideId);
            if (!MODEL.containsKey(key)) {
                NEW_MODEL.add(key);
                MODEL.put(key, modelId + "08");
            }
        }
    }

    /**
     * 根据角色ID获取坐骑前缀（使用HashMap优化）
     */
    private static String getRidePrefix(Long modelId) {
        return RIDE_PREFIX_MAP.getOrDefault(modelId, String.valueOf(modelId));
    }

    /**
     * 初始化新模型数据
     */
    public static void initNewModel() {
        // 四转角色
        long[] fourTurnModels = {20011L, 20012L, 21011L, 21012L, 22011L, 22012L, 23007L, 23008L, 24007L, 24008L};

        // 四转以下角色
        long[] belowFourTurnModels = {
                20001L, 20002L, 20003L, 20004L, 20005L, 20006L, 20007L, 20008L, 20009L, 20010L,
                21001L, 21002L, 21003L, 21004L, 21005L, 21006L, 21007L, 21008L, 21009L, 21010L,
                22001L, 22002L, 22003L, 22004L, 22005L, 22006L, 22007L, 22008L, 22009L, 22010L,
                23001L, 23002L, 23003L, 23004L, 23005L, 23006L,
                24001L, 24002L, 24003L, 24004L, 24005L, 24006L
        };

        // 处理四转角色
        for (long modelId : fourTurnModels) {
            long eighthRideId = EIGHTH_RIDE_OFFSET | modelId;
            String key = String.valueOf(eighthRideId);

            if (!MODEL.containsKey(key)) {
                NEW_MODEL.add(key);
                MODEL.put(key, modelId + "008");
            }
        }

        // 处理四转以下角色
        for (long modelId : belowFourTurnModels) {
            long eighthRideId = EIGHTH_RIDE_OFFSET | modelId;
            String key = String.valueOf(eighthRideId);

            if (!MODEL.containsKey(key)) {
                NEW_MODEL.add(key);
                String prefix = getRidePrefix(modelId);
                MODEL.put(key, prefix + "08");
            }
        }
    }

    public static Integer interfaceConfig = 1;
    // 唯一商品名称
    static final String[] ONLY = new String[]{"元气蛋"};

    /**
     * 判断商品是否是唯一商品， 唯一商品不允许拥有两件
     */
    public static boolean isOnly(String goodsName) {
        if (goodsName == null || goodsName.isEmpty()) {
            return false;
        }
        for (String name : ONLY) {
            if (name.equals(goodsName)) {
                return true;
            }
        }
        return false;
    }

    /**
     * 判断物品玩家是否拥有（背包+当铺）
     */
    public static boolean isExist(String goodsName) {
        if (goodsName == null || goodsName.isEmpty()) {
            return false;
        }

        // 检查当铺物品
        List<Good> list2 = DDGoodUntil.ddgood;
        if (list2 != null) {
            for (Good goods : list2) {
                if (goods != null && goods.getGoodstable() != null &&
                        goodsName.equals(goods.getGoodstable().getGoodsname())) {
                    return true;
                }
            }
        }

        // 检查背包物品
        Goodstable[] list = GoodsListFromServerUntil.getGoodslist();
        if (list != null) {
            for (Goodstable goods : list) {
                if (goods != null && goodsName.equals(goods.getGoodsname())) {
                    return true;
                }
            }
        }
        return false;
    }

    /**
     * 判断玩家背包是否已满
     */
    public static boolean isFull() {
        Goodstable[] goods = GoodsListFromServerUntil.getGoodslist();
        if (goods == null) {
            return true;
        }
        for (Goodstable good : goods) {
            if (good == null) {
                return false;
            }
        }
        return true;
    }

    /**
     * 判断字符串是数字
     */
    public static boolean isNumeric(String str) {
        if (str == null || str.isEmpty()) {
            return false;
        }
        for (int i = 0; i < str.length(); i++) {
            if (!Character.isDigit(str.charAt(i))) {
                return false;
            }
        }
        return true;
    }

    /**
     * 根据转生次数计算技能当前熟练度
     */
    public static long getProficiency(int lvltrue) {
        switch (lvltrue) {
            case 0: return 10000;
            case 1: return 15000;
            case 2: return 20000;
            case 3: return 25000;
            case 4: return 25000;
            default: return 0;
        }
    }

    private static final Map<String, Configrue> CONFIGURE = new HashMap<>();
    public static final String CLIENT = "netty";
    public static final String DOWNLOAD = "download";

    public static Map<String, Configrue> getConfigure() {
        if (!CONFIGURE.isEmpty()) {
            return CONFIGURE;
        }

        SAXReader reader = new SAXReader();
        try {
            Document document = reader.read(new File("resource/other/configure.xml"));
            Element root = document.getRootElement();
            for (Iterator<Element> iterator = root.elementIterator(); iterator.hasNext(); ) {
                Configrue config = new Configrue();
                Element peopleElement = iterator.next();
                for (Iterator<Element> childIterator = peopleElement.elementIterator(); childIterator.hasNext(); ) {
                    Element childPeopleElement = childIterator.next();
                    if ("address".equals(childPeopleElement.getName())) {
                        config.setAddress(decrypt(childPeopleElement.getText()));
                    } else if ("port".equals(childPeopleElement.getName())) {
                        config.setPort(Integer.valueOf(childPeopleElement.getText()));
                    }
                }
                CONFIGURE.put(peopleElement.attribute("type").getValue(), config);
            }
        } catch (DocumentException e) {
            e.printStackTrace();
        }
        return CONFIGURE;
    }

    private static final BASE64Encoder base64Encoder = new BASE64Encoder();
    private static final BASE64Decoder base64Decoder = new BASE64Decoder();
    private static final String AES = "AES";
    private static final String CRYPT_KEY = "BIGGREEN45977309";

    /**
     * 加密
     */
    public static String encrypt(byte[] src) throws Exception {
        Cipher cipher = Cipher.getInstance(AES);
        SecretKeySpec securekey = new SecretKeySpec(CRYPT_KEY.getBytes(), AES);
        cipher.init(Cipher.ENCRYPT_MODE, securekey);
        return base64Encoder.encode(cipher.doFinal(src));
    }

    /**
     * 解密
     */
    public static String decrypt(String mm) {
        if (mm == null || mm.isEmpty()) {
            return "";
        }
        try {
            byte[] src = base64Decoder.decodeBuffer(mm);
            Cipher cipher = Cipher.getInstance(AES);
            SecretKeySpec securekey = new SecretKeySpec(CRYPT_KEY.getBytes(), AES);
            cipher.init(Cipher.DECRYPT_MODE, securekey);
            return new String(cipher.doFinal(src));
        } catch (Exception e) {
            e.printStackTrace();
        }
        return "";
    }
}